package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PartyEducationMapper;
import com.ruoyi.system.domain.PartyEducation;
import com.ruoyi.system.service.IPartyEducationService;

/**
 * 党员教育Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-23
 */
@Service
public class PartyEducationServiceImpl implements IPartyEducationService 
{
    @Autowired
    private PartyEducationMapper partyEducationMapper;

    /**
     * 查询党员教育
     * 
     * @param peId 党员教育ID
     * @return 党员教育
     */
    @Override
    public PartyEducation selectPartyEducationById(Long peId)
    {
        return partyEducationMapper.selectPartyEducationById(peId);
    }

    /**
     * 查询党员教育列表
     * 
     * @param partyEducation 党员教育
     * @return 党员教育
     */
    @Override
    public List<PartyEducation> selectPartyEducationList(PartyEducation partyEducation)
    {
        return partyEducationMapper.selectPartyEducationList(partyEducation);
    }

    /**
     * 新增党员教育
     * 
     * @param partyEducation 党员教育
     * @return 结果
     */
    @Override
    public int insertPartyEducation(PartyEducation partyEducation)
    {partyEducation.setCreateTime(DateUtils.getNowDate());
        return partyEducationMapper.insertPartyEducation(partyEducation);
    }

    /**
     * 修改党员教育
     * 
     * @param partyEducation 党员教育
     * @return 结果
     */
    @Override
    public int updatePartyEducation(PartyEducation partyEducation)
    {partyEducation.setUpdateTime(DateUtils.getNowDate());
        return partyEducationMapper.updatePartyEducation(partyEducation);
    }

    /**
     * 批量删除党员教育
     * 
     * @param peIds 需要删除的党员教育ID
     * @return 结果
     */
    @Override
    public int deletePartyEducationByIds(Long[] peIds)
    {
        return partyEducationMapper.deletePartyEducationByIds(peIds);
    }

    /**
     * 删除党员教育信息
     * 
     * @param peId 党员教育ID
     * @return 结果
     */
    @Override
    public int deletePartyEducationById(Long peId)
    {
        return partyEducationMapper.deletePartyEducationById(peId);
    }
}
